import { getToken } from "./tokenUtils";
// 关闭iframe
export const closeIframe = () => {
  window.parent.postMessage(
    {
      action: 'close-iframe',
      // timestap: Date.now(),
    },
    window.location.origin
  );
};
// token过期
export const noAuthorization = () => {
  window.parent.postMessage(
    {
      action: 'no-authorization',
      token: getToken()
    },
    window.location.origin
  );
};